package reflect;

import reflectAno.AutoRun;

@AutoRun
public class Person {

    private String name="zhang";
    private int age=18;

    public Person() {
    }

    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public Person(String name) {
        this.name = name;
    }

    public void say(String name,int age)
    {
        System.out.println(name+"你好");
    }
    @AutoRunMethod()
    public void SayHello()
    {
        System.out.println(name+":hello");
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

    private void hehe()
    {
        System.out.println("private");
    }
    @AutoRunMethod(value = 9)
    public void watchTV()
    {
        System.out.println(name+"watching");
    }
    @AutoRunMethod(5)
    public void playGames()
    {
        System.out.println(name+"playing");
    }

    public void swim()
    {
        System.out.println(name+"swimming");
    }

    public void eat()
    {
        System.out.println(name+"eating");
    }

    public void sing()
    {
        System.out.println(name+"singing");
    }


    public void sleep()
    {
        System.out.println(name+"sleeping");
    }
}
